<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <meta name="viewport"
  content="width=device-width, initial-scale=1.0, minimum-scale=1,maximum-scale=1,user-scalable=no">
 <meta http-equiv="X-UA-Compatible" content="ie=edge">
 <title data-ch="恐龙探险" data-en="Dinosaur Adventure" class="document_title">恐龙探险</title>
 <script src="js/jquery-3.3.1.min.js"></script>
 <script src="js/common.js"></script>
 <script src="js/rem.js"></script>
 <script src="js/layer.js"></script>
 <script type="text/javascript">
  isLogin();
 </script>
 <link rel="stylesheet" href="css/common.css">
 <link rel="stylesheet" href="css/index.css">
</head>
<body>
 <!--头部-->
 <div class=" jui_top_bar shouyi_header">
  <a class="jui_top_left" href="javascript:history.back(-1)"><img src="icons/back.png"></a>
  <div class="jui_top_middle">
   <div class="shouyi_title font_weight col_fff" data-ch="个人收益" data-en="Income">个人收益</div>
   <div class="shouyi_title shouyi_num">0.00</div>
  </div>
 </div>
 <!-- 头部end -->

 <!-- 收益部分 -->
 <div class="shouyi_list_box jui_main">
  <!-- 列表内容 -->

  <!-- 内容为空时显示 -->

 </div>
 <!-- 收益end -->

 <script>
  $(function(){
   let data = {
    uid: localStorage.getItem("u_id"),
    token: localStorage.getItem("token"),
    language_type: localStorage.getItem("language_type"),
    l_type: 2
   }
   $.ajax({
    type: 'post',
    url: baseURL + '/index.php?m=index&c=wallet_log',
    data: data,
    success: function success(data) {
     data = JSON.parse(data);
	 is_login(data);
     if (data.code == 1) {
      $(".shouyi_num").html(Number(data.user.m_credit_2).toFixed(2))
      let userList = '';
      if(data.data.length == 0){
       userList = `<div class="if_null">
        <img class="if_null_img" src="./icons/nothing.png" alt="">
        <div class="if_null_text col_000 f30" data-ch="暂无内容" data-en="No data">暂无内容</div>
       </div>`
      } else {
       data.data.forEach(function(item){
        time = stampToDate(item.l_time);
        userList += `<div class="shouyi_list border_radius02 latout_mask">
         <div class="shouyi_list_top flex_be">
          <div class="f32 font_weight ${item.l_status == 1 ? 'col_green' : 'color_red'}">
           ${item.l_status == 1 ? '+' : '-'}${item.l_num}
          </div>
          <div class="col_fff f28">${item.l_d_date} ${item.l_d_time}</div>
         </div>
         <div class="shouyi_list_bottom col_fff f30">
          ${item.l_info}
         </div>
        </div>`
       })
      }
      $(".shouyi_list_box").html(userList)
     } else {
      box_timer(data.msg);
     }
    }
   })
   language();
   documentName()
  })
 </script>
</body>
</html>